define("galleriesCommon/utils/galleriesHelperFunctions",["skinExports","lodash","coreUtils"],function(a,b,c){"use strict";function d(b){var c=a[b];return c&&c.heightDiff||0}function e(b){var c=a[b];return c&&c.widthDiff||0}function f(a,b,d,e,f){var g=d;var h=this.getSkinHeightDiff(e);var i=c.matrix.calculations.getItemHeight(d,f,a,h);return Math.floor(b*i+(b-1)*g)+h}function g(a,c,d){var e=0;var f=parseInt(c.imgHeightDiff&&c.imgHeightDiff.value,10)||0;var g=parseInt(c.topPadding&&c.topPadding.value,10)||0;if(f||g){e=f+g}else if(a&&a.exports){if(d==="mobileView"){e=b.isNumber(a.exports.m_heightDiff)?a.exports.m_heightDiff:a.exports.heightDiff||0}else{e=a.exports.heightDiff||0}}return e}function h(a,c){var d=0;if(a&&a.exports){if(c==="mobileView"){d=b.isNumber(a.exports.m_widthDiff)?a.exports.m_widthDiff:a.exports.widthDiff||0}else{d=a.exports.widthDiff||0}}return d}return{getSkinHeightDiff:d,getSkinWidthDiff:e,getGalleryHeight:f,getDisplayerHeightDiff:g,getDisplayerWidthDiff:h}});define("galleriesCommon/mixins/galleryAutoPlayMixin",["santaProps"],function(a){"use strict";function b(a){return a.items.length>0}function c(a,c){return b(a)&&c.autoplay}return{propTypes:{compProp:a.Types.Component.compProp.isRequired,compData:a.Types.Component.compData.isRequired,isZoomOpened:a.Types.isZoomOpened.isRequired,id:a.Types.Component.id.isRequired,isPlayingAllowed:a.Types.RenderFlags.isPlayingAllowed},getInitialState:function(){var a=c(this.props.compData,this.props.compProp);return{$showAutoPlayButton:this.shouldShowAutoPlay()?"showPlayButton":"hidePlayButton",shouldAutoPlay:a,$slideshow:a&&!this.props.isZoomOpened&&this.props.isPlayingAllowed?"autoplayOn":"autoplayOff"}},shouldShowAutoPlay:function(){if(this.props.compProp.isHidden){return false}return b(this.props.compData)&&this.props.compProp.showAutoplay},toggleAutoPlay:function(){if(!b(this.props.compData)){return}var a="autoplayOff";if(this.state.$slideshow==="autoplayOff"){if(!this.props.isPlayingAllowed){return}a="autoplayOn"}this.setState({shouldAutoPlay:!this.state.shouldAutoPlay,$slideshow:a},function(){this.updateAutoplayState();this.handleAction(a)})},componentWillReceiveProps:function(a){var b=this.state.shouldAutoPlay&&!a.isZoomOpened&&a.isPlayingAllowed?"autoplayOn":"autoplayOff";if(b!==this.state.$slideshow){this.setState({$slideshow:b},this.updateAutoplayState)}},updateAutoplayState:function(){this.clearTimeoutNamed(this.props.id);if(this.state.$slideshow==="autoplayOn"){this.setTimeoutNamed(this.props.id,this.autoplayCallback,this.getAutoplayInterval())}},autoplayCallback:function(){if(this.props.isZoomOpened){return}if(this.props.compProp.autoPlayDirection==="LTR"){this.prev()}else{this.next()}},getAutoplayInterval:function(){var a=this.props.compProp.autoplayInterval;return Math.floor(a*1e3)}}});define("galleriesCommon",["galleriesCommon/utils/galleriesHelperFunctions","galleriesCommon/mixins/galleryAutoPlayMixin"],function(a,b){"use strict";return{utils:{galleriesHelperFunctions:a},mixins:{galleryAutoPlayMixin:b}}});